7690de
@@ -549,7 +549,7 @@
private long evaluateChildExpr(Statistics stats, ExprNodeDesc child,
               ColStatistics cs = stats.getColumnStatisticsFromColName(colName);
               if (cs != null) {
                 long dvs = cs.getCountDistint();
-                numRows = dvs == 0 ? numRows / 2 : numRows / dvs;
+                numRows = dvs == 0 ? numRows / 2 : Math.round( (double)numRows / dvs);
                 return numRows;
               }
             } else if (leaf instanceof ExprNodeColumnDesc) {
@@ -569,7 +569,7 @@
private long evaluateChildExpr(Statistics stats, ExprNodeDesc child,
                 ColStatistics cs = stats.getColumnStatisticsFromColName(colName);
                 if (cs != null) {
                   long dvs = cs.getCountDistint();
-                  numRows = dvs == 0 ? numRows / 2 : numRows / dvs;
+                  numRows = dvs == 0 ? numRows / 2 : Math.round( (double)numRows / dvs);
                   return numRows;
                 }
               }
